package com.yupi.springbootinit.RabbitMQ;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class BiProducer {
    @Resource
    private RabbitTemplate rabbitTemplate;

    public void send(String message) {
        rabbitTemplate.convertAndSend(BIMQStringEnum.BI_EXCHANGE,BIMQStringEnum.BI_ROUTING_KEY,message);
    }
}
